<template>
  <view class="fixedTop" v-if="isShare">
    <view class="top-nav-box">
      <view class="back-icon-box" @click="backClick">
        <image class="back-icon" src="@/static/img/black-back.png" mode="aspectFit"></image>
      </view>
      <view class="nav-center" style="font-size: 34rpx">项目资料</view>
    </view>
  </view>
</template>

<script>
export default {
  props:{
    shareTitle:'',
    shareContent:'',
    sale:''//销售数量
  },
  data() {
    return {
      isShare:this.$route.query.type=='share' ? false : true
    };
  },
  created() {
    this.gettopColor()
  },
  methods: {
    backClick(){
     this.$emit("goback")
    },
    //判断顶部颜色
    gettopColor(){
      const nav = navigator.userAgent;
      if (nav.indexOf('Android') > -1 || nav.indexOf('Adr') > -1) {
        phone.setStatusBarColor("#ffffff")
      } else if (!!nav.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)) {
        this.$bridge.callhandler('backgroundColorChange', {topColor:'#ffffff',bottomColor:"#ffffff"}, res => {});
      }
    },
  }
};
</script>

<style lang="scss">
.receiveCouponBox {
  padding: 30rpx;
  .ipt-border {
    margin-bottom: 20rpx;
    padding: 18rpx;
  }
}
.top-nav-box {
  background: #fff;
  color: #000;
  text-align: center;
  position: relative;
  height: 88rpx;
  line-height: 88rpx;
  font-size: 30rpx;
  display: flex;
  padding: 0rpx 16rpx;
  box-shadow: 0px 15px 7px -21px #000;
  .back-icon-box{
    height: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    .back-icon{
      width: 32rpx;
      height: 30rpx;
    }
  }
  .nav-center {
    flex: 1;
  }
  .nav-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    .image-wrapper {
      margin-top: 15rpx;
      margin-right: 30rpx;
      width: 50rpx;
      height: 60rpx;
      image {
        width: 100%;
        height: 100%;
      }
    }
    .image-wrapper2 {
      margin-top: 15rpx;
      width: 50rpx;
      height: 60rpx;
      image {
        width: 100%;
        height: 100%;
      }
    }
  }
}
.item-popup {
  margin: 0 auto;
  .item-txt {
    height: 28rpx;
    font-size: 20rpx;
    margin: 0 auto;
    color: #ffffff;
  }
  .img1 {
    width: 330rpx;
    height: 86rpx;
    margin: 0 auto;
    image {
      width: 100%;
      height: 100%;
    }
  }
  .img2 {
    width: 376rpx;
    height: 260rpx;
    margin: 20rpx auto 0;
    image {
      width: 100%;
      height: 100%;
    }
  }
  .img3 {
    width: 200rpx;
    height: 60rpx;
    margin: 15rpx auto;
    image {
      width: 100%;
      height: 100%;
    }
  }
  .img4 {
    width: 40rpx;
    height: 40rpx;
    margin: 20rpx auto;
    image {
      width: 100%;
      height: 100%;
    }
  }
}
</style>
